
        <HTML>
		<HEAD>
		<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
		<meta name="description" content="Flash MX 2004 ActionScript2.0 Library: Polynomial - Wright Internet Solutions">
		<meta name="keywords" content="algebra,Polynomial,Flash,MX,2004,ActionScript,ActionScript2.0,AS2.0 Library,AS2,AS2 Library,Wright Internet Solutions,Wright,class,documentation,methods,functions,interfaces,JavaScript,Java">
		<TITLE>WIS AS2 Library : com.wis.math.alg.Polynomial Documentation</TITLE>

		<STYLE><!--
		HR.small{height:1px; width:100%; background:#E7BFA3; border: 0px;}
		HR.big{height:4px; width:100%; background:#E7BFA3; border: 0px;}
		A:hover{text-decoration: underline}
		A{text-decoration: none; color: #993333}
		code{font-family: monospace; font-size: 12px; color: #666666;}
		.methodAttributesTitle{font-size: 12px; font-weight: bold; color: #7B779C}
		.ToC{font-size: 12px; font-weight: bold; color: #993333}
		.methodTitle{font-size: 14px; font-weight: bold; color: #993333}
		.groupTitle{font-size: 18px; font-weight: bold; color: #993333}
		.sectionTitle{font-size: 22px; font-weight: bold; color: #993333}
		.majorTitle{font-size: 32px; font-weight: bold; color: #993333; padding-bottom:100px;}
		.methodsDiv{margin-left:40px;}
		.footer{font-size: 11px; color: #666666;}
		body{font-family: arial,sans-serif; font-size: 12px;}
		//--></STYLE>

		</HEAD>
		<BODY bgColor='#ffffcc'>
		<P class='majorTitle'>com.wis.math.alg.Polynomial Documentation</P>


		<P><B>Author:</B> <a href='mailto:wisolutions2002@shaw.ca?subject=wisASLibrary Polynomial Class'>Richard Wright</a><BR>
		<B>Last Modified:</B> 07/17/04 18:47:28<HR class='big'>

		<P class='sectionTitle'>Summary</P>
		<P class='ToC'>com.wis.math.alg.Polynomial class:</P>
		<div class='methodsDiv'><a href='#classinfo'>- description</a></div>
<P class='ToC'>com.wis.math.alg.Polynomial Properties:</P><div class='methodsDiv'>
<a href='#$coefs'>- $coefs</a><br>
<a href='#$TOLERANCE'>- $TOLERANCE</a><br>
<a href='#$ACCURACY'>- $ACCURACY</a><br>
</div><br>
<P class='ToC'>com.wis.math.alg.Polynomial Methods:</P><div class='methodsDiv'>
<a href='# init'>-  init</a><br>
<a href='# eval'>-  eval</a><br>
<a href='# multiply'>-  multiply</a><br>
<a href='# divideScalar'>-  divideScalar</a><br>
<a href='# simplify'>-  simplify</a><br>
<a href='# bisection'>-  bisection</a><br>
<a href='# toString'>-  toString</a><br>
<a href='# get _degree'>-  get _degree</a><br>
<a href='# getDerivative'>-  getDerivative</a><br>
<a href='# getRoots'>-  getRoots</a><br>
<a href='# getRootsInInterval'>-  getRootsInInterval</a><br>
<a href='# getLinearRoot'>-  getLinearRoot</a><br>
<a href='# getQuadraticRoots'>-  getQuadraticRoots</a><br>
<a href='# getCubicRoots'>-  getCubicRoots</a><br>
<a href='# getQuarticRoots'>-  getQuarticRoots</a><br>
<a href='# pow2'>-  pow2</a><br>
</div><br>

		<HR class='big'>
		<P class='sectionTitle'><A name='classinfo'></A>com.wis.math.alg.Polynomial <I>class</I></P>
		<P> <span class='methodTitle'>version:</span> 1.6</P>
		<P class="methodTitle">description:</P>
		<P>Implements the behaviours of the Polynomial Class -- provides
 methods for polynomial calculations up to the 4th degree.
 		        <p>
 </P>
		<P class="methodTitle">usage:</P> <pre>var inst:Polynomial = new Polynomial()</pre>

<P> <span class='methodTitle'>parameters:</span>
				<ul>
<li>      none  -- no class input parameters.</li>
</ul>

			<HR class='small'>
			<P class='groupTitle'><A name='properties'></A>com.wis.math.alg.Polynomial Properties:</P>
			<div class='methodsDiv' >


				<P class='methodTitle'><A name='$coefs'></A><u> $coefs</u></P>
				<P> -- array to hold polynomial coefficients.</P>

				<P class='methodTitle'><A name='$TOLERANCE'></A><u> $TOLERANCE</u></P>
				<P> -- static -- minimum value to truncate computation.</P>

				<P class='methodTitle'><A name='$ACCURACY'></A><u> $ACCURACY</u></P>
				<P> -- static -- ceiling applied to log value in 'bisection' method.</P>
</div>

			<HR class='small'>
			<P class='groupTitle'><A name='methods'></A>com.wis.math.alg.Polynomial Methods:</P>
			<div class='methodsDiv' >


				<P class='methodTitle'><A name=' init'></A><u>  init</u></P>
				<P><span class='methodAttributesTitle'>description: </span>
				Populates new instance's $coefs array with input array values.
     </P>
				<P><span class='methodAttributesTitle'>usage:</span> <pre>inst.init(coefs);</pre>
     </P>
<P> <span class='methodAttributesTitle'>parameters:</span><ul>
<li>  coefs   (Array)  -- an array containing coefficients of this instance.</li>
</ul></P>
<P><span class='methodAttributesTitle'>returns:</span> (Void)
    </P>

				<P class='methodTitle'><A name=' eval'></A><u>  eval</u></P>
				<P><span class='methodAttributesTitle'>description: </span>
				Calculates result of summation of coefficient multiplication
     by the input value.
     </P>
				<P><span class='methodAttributesTitle'>usage:</span> <pre>inst.eval(x);</pre>
     </P>
<P> <span class='methodAttributesTitle'>parameters:</span><ul>
<li>  x   (Number)  -- a real number.</li>
</ul></P>
<P><span class='methodAttributesTitle'>returns:</span> (Number)  -- returns result of claculation.
    </P>

				<P class='methodTitle'><A name=' multiply'></A><u>  multiply</u></P>
				<P><span class='methodAttributesTitle'>description: </span>
				Calculates multiplication of the coefficients of this
     instance and the passed Polynomial object.
     </P>
				<P><span class='methodAttributesTitle'>usage:</span> <pre>inst.multiply(that);</pre>
     </P>
<P> <span class='methodAttributesTitle'>parameters:</span><ul>
<li>  that   (Polynomial)  -- a Polynomial object.</li>
</ul></P>
<P><span class='methodAttributesTitle'>returns:</span> (Polynomial)  -- returns a new Polynomial object containing the result of the multiplications.
    </P>

				<P class='methodTitle'><A name=' divideScalar'></A><u>  divideScalar</u></P>
				<P><span class='methodAttributesTitle'>description: </span>
				Calculates division of this instance's coefficients by the paseed scalar value.
     </P>
				<P><span class='methodAttributesTitle'>usage:</span> <pre>inst.divideScalar(scalar);</pre>
     </P>
<P> <span class='methodAttributesTitle'>parameters:</span><ul>
<li>  scalar   (Number)  -- a real number.</li>
</ul></P>
<P><span class='methodAttributesTitle'>returns:</span> (Void)
    </P>

				<P class='methodTitle'><A name=' simplify'></A><u>  simplify</u></P>
				<P><span class='methodAttributesTitle'>description: </span>
				Simplifies this instance by testing $coefs elements against
     class tolerance property.
     </P>
				<P><span class='methodAttributesTitle'>usage:</span> <pre>inst.simplify();</pre>
     </P>
<P><span class='methodAttributesTitle'>returns:</span> (Void)
    </P>

				<P class='methodTitle'><A name=' bisection'></A><u>  bisection</u></P>
				<P><span class='methodAttributesTitle'>description: </span>
				Calculates bisection of this Polynomial instance.
     </P>
				<P><span class='methodAttributesTitle'>usage:</span> <pre>inst.bisection(min,max);</pre>
     </P>
<P> <span class='methodAttributesTitle'>parameters:</span><ul>
<li>  min   (Number)  -- a real number.</li>
<li>  max   (Number)  -- a real number.</li>
</ul></P>
<P><span class='methodAttributesTitle'>returns:</span> (Number)  -- returns result of Polynomial bisection operation.
    </P>

				<P class='methodTitle'><A name=' toString'></A><u>  toString</u></P>
				<P><span class='methodAttributesTitle'>description: </span>
				Creates a string representation of this instance's
     coefficients, preserving positive and negative signs.
     </P>
				<P><span class='methodAttributesTitle'>usage:</span> <pre>inst.toString();</pre>
     </P>
<P><span class='methodAttributesTitle'>returns:</span> (String)  -- returns a string representation of this instance's coefficients.
    </P>

				<P class='methodTitle'><A name=' get _degree'></A><u>  get _degree</u></P>
				<P><span class='methodAttributesTitle'>description: </span>
				Gets degree of this Polynomial instance.
     </P>
				<P><span class='methodAttributesTitle'>usage:</span> <pre>inst._degree;</pre>
     </P>
<P><span class='methodAttributesTitle'>returns:</span> (Number)  -- returns degree of this instance.
    </P>

				<P class='methodTitle'><A name=' getDerivative'></A><u>  getDerivative</u></P>
				<P><span class='methodAttributesTitle'>description: </span>
				Gets derivative coefficients of this Polynomial instance.
     </P>
				<P><span class='methodAttributesTitle'>usage:</span> <pre>inst.getDerivative();</pre>
     </P>
<P><span class='methodAttributesTitle'>returns:</span> (Polynomial)  -- returns a new Polynomial object containing derivative coefficients of this instance's coefficients.
    </P>

				<P class='methodTitle'><A name=' getRoots'></A><u>  getRoots</u></P>
				<P><span class='methodAttributesTitle'>description: </span>
				Gets roots of this Polynomial instance.
     </P>
				<P><span class='methodAttributesTitle'>usage:</span> <pre>inst.getRoots();</pre>
     </P>
<P><span class='methodAttributesTitle'>returns:</span> (Array)  -- returns an array containing polynomial roots.
    </P>

				<P class='methodTitle'><A name=' getRootsInInterval'></A><u>  getRootsInInterval</u></P>
				<P><span class='methodAttributesTitle'>description: </span>
				Gets roots in interval of this Polynomial instance.
     </P>
				<P><span class='methodAttributesTitle'>usage:</span> <pre>inst.getRootsInInterval(min,max);</pre>
     </P>
<P> <span class='methodAttributesTitle'>parameters:</span><ul>
<li>  min   (Number)  -- a real number.</li>
<li>  max   (Number)  -- a real number.</li>
</ul></P>
<P><span class='methodAttributesTitle'>returns:</span> (Array)  -- returns an array containing Polynomial roots.
    </P>

				<P class='methodTitle'><A name=' getLinearRoot'></A><u>  getLinearRoot</u></P>
				<P><span class='methodAttributesTitle'>description: </span>
				Gets root of a linear polynomial.
     </P>
				<P><span class='methodAttributesTitle'>usage:</span> <pre>inst.getLinearRoot();</pre>
     </P>
<P><span class='methodAttributesTitle'>returns:</span> (Array)  -- returns an array containing linear polynomial root.
    </P>

				<P class='methodTitle'><A name=' getQuadraticRoots'></A><u>  getQuadraticRoots</u></P>
				<P><span class='methodAttributesTitle'>description: </span>
				Gets roots of a quadratic polynomial.
     </P>
				<P><span class='methodAttributesTitle'>usage:</span> <pre>inst.getQuadraticRoots();</pre>
     </P>
<P><span class='methodAttributesTitle'>returns:</span> (Array)  -- returns an array containing quadratic polynomial roots.
    </P>

				<P class='methodTitle'><A name=' getCubicRoots'></A><u>  getCubicRoots</u></P>
				<P><span class='methodAttributesTitle'>description: </span>
				Gets roots of a cubic polynomial.
     </P>
				<P><span class='methodAttributesTitle'>usage:</span> <pre>inst.getCubicRoots();</pre>
     </P>
<P><span class='methodAttributesTitle'>returns:</span> (Array)  -- returns an array containing cubic polynomial roots.
    </P>

				<P class='methodTitle'><A name=' getQuarticRoots'></A><u>  getQuarticRoots</u></P>
				<P><span class='methodAttributesTitle'>description: </span>
				Gets roots of a quartic polynomial.
     </P>
				<P><span class='methodAttributesTitle'>usage:</span> <pre>inst.getQuarticRoots();</pre>
     </P>
<P><span class='methodAttributesTitle'>returns:</span> (Array)  -- returns an array containing quartic polynomial roots.
    </P>

				<P class='methodTitle'><A name=' pow2'></A><u>  pow2</u></P>
				<P><span class='methodAttributesTitle'>description: </span>
				Solves the Math.pow() negative value input bug.
     </P>
				<P><span class='methodAttributesTitle'>usage:</span> <pre>inst.pow2(a,n);</pre>
     </P>
<P> <span class='methodAttributesTitle'>parameters:</span><ul>
<li>  a   (Number)  -- a real number.</li>
<li>  n   (Number)  -- a real number.</li>
</ul></P>
<P><span class='methodAttributesTitle'>returns:</span> (Number)  -- returns the result of the 'Math.pow' method.
    </P>
</div>

			<BR>
			<BR>
			<HR class='big'>
			<span class="footer">generated with <A href='http://blog.klaustrofobik.org/' target='_blank'>AS2docGenerator beta 0.5.3</A></span>
			</BODY>
			</HTML>

